<?php
// +-------------------------------------------------------------+
// | Tinysupe [ SIMPLE IS THE BEST ! ]
// +-------------------------------------------------------------+
// | Copyright (c) 2011 www.srccn.com All rights reserved.
// +-------------------------------------------------------------+
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +-------------------------------------------------------------+
// | Author: tinysu <tinysu@qq.com>
// +-------------------------------------------------------------+

error_reporting(E_ALL);

// constant setting
define('RUNTIME', microtime(true));
define('ROOTDIR', realpath(dirname(__FILE__)).'/');
define('SITEDIR', str_replace('//', '/', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']).'/')));

//define('DATAURL', NULL);
define('DATAURL', 'mysql://root:pwd@localhost:3306/dbname');

// require kernel
require(ROOTDIR.'system/kernel.php');

// public setting
$tm->dir = 'themes/default';
$tm->assign('sitedir', SITEDIR);
$tm->assign('webname', 'Tiny Su\'s Blog');
$tm->assign('webmotto', 'SIMPLE IS THE BEST !');
$tm->assign('skindir', SITEDIR.$tm->dir.'/');
$tm->assign('pathinfo', $pathinfo = strtolower(@$_SERVER['PATH_INFO']));
$tm->assign('entry', basename($_SERVER['PHP_SELF'], '.php'));

$tm->assign('keyword', $keyword = trim(@$_GET['kw']));

// sidebar
//$sidebar = ht_import('sidebar', 'sidebar') or die('cannot import class sidebar!');
?>